Important: Any C/C++ code compiled against the QuickTime VR headers *REQUIRES* headers and libraries from Quicktime 2.5 or newer; QuickTime 2.5's interfaces are included here. The sample code also requires updated interfaces for several additional APIs. All of these are included in a folder called Updated Interfaces.
There are two ways to use the new interfaces; you can either replace and add to the existing interfaces in your environment, or use the Updated Interfaces folder separately and make sure that it is first in your interfaces search path. If you chose the latter and are using CodeWarrior, we recommend you drop the Updated Interfaces folder in "{compiler ƒ}:Mac OS Support:"; this is where the enclosed sample code projects are set to search first.
The Sample Code
All of the sample code uses CodeWarrior 10 projects (IDE v1.7), and should work fine with either of the above mechanisms for updating to the Updated Interfaces; if you chose to replace your existing interfaces, you may get an access path warning which can be ignored.
Note that if you get compiler errors in areas containing the word "Atom", the project didn't find the updated headers.
The sample code is all designed so that it can compile directly from the directory structure in which it was placed on the CD; that is, with the "QuickTime™ VR API" folder as a sibling to the "Sample Code" folder.
For more information on the samples, see their respective Read-Me files.
The API
The QuickTime VR API consists of the following files:
-- QTVR.h
The QuickTime VR API interfaces header for C/C++.
-- QTVRFrmt.h
The QuickTime VR File Format data structures header for C/C++; not needed to play back existing files.
-- QuickTimeVRLib
The shared library to link against for PowerPC development.
-- QTVR.MW.c.o
The 68k object file to be linked in for use with MetroWerks compilers.
-- QTVR.SC.c.o
The 68k object file to be linked in for use with SC under MPW.
Documentation Errata
Page 1-48: kQTVRInteractionPanTiltSpeed is valid only for panoramas, and not objects.
Pages 1-86 to 1-88, 1-90 to 1-93: QTVRMouseEnter, QTVRMouseWithin, QTVRMouseLeave, QTVRMouseDown, QTVRMouseStillDown, and QTVRMouseUp all have an additional WindowPtr parameter, w. The new prototypes read as follows:
OSErr QTVRMouseEnter (QTVRInstance qtvr, Point pt, UInt32 *hotSpotID, WindowPtr w);
OSErr QTVRMouseWithin (QTVRInstance qtvr, Point pt, UInt32 *hotSpotID, WindowPtr w);
OSErr QTVRMouseLeave (QTVRInstance qtvr, Point pt, WindowPtr w);
OSErr QTVRMouseStillDown (QTVRInstance qtvr, Point pt, UInt32 *hotSpotID, WindowPtr w);
OSErr QTVRMouseUp (QTVRInstance qtvr, Point pt, UInt32 *hotSpotID, WindowPtr w);
The parameter pt is the current location of the cursor, in the local coordinates of the graphics world w.
When intercepting these functions, w is in the appropriate location in the intercept record.
The WindowPtr parameter was added because it is possible for the movie and its controller to exist in different graphics worlds, and so it is not possible to simply assume that pt is in the local coordinates of the graphics world of the movie.
Page 1-152: Under MyImagingCompleteProc/Special Considerations, it is stated that if kQTVRImagingDirectDraw is true, then images are drawn directly to the destination without your MyImagingCompleteProc function being called; this is no longer true. QuickTime VR now temporarily overrides the setting of kQTVRImagingDirectDraw if a PrescreenImagingCompleteProc is installed.
Page 2-23: In some cases, the QuickTime VR movie controller will suppress a button even when it has not been explicitly supressed via a flag; for example, the speaker button is suppressed if there is no sound track in movie. If mcFlagQTVRExplicitFlagSet is set when mcActionSetFlags is called, the flags parameter will have a different meaning: for each bit set in the flags parameter, the controller will not attempt to do anything intelligent regarding displaying or hiding that feature/button, but will instead just hide or show the button based on the setting of the equivalent flag in the flags parameter of a call to mcActionSetFlags without mcFlagQTVRExplicitFlagSet.
Note that this allows you to use the usual mcActionSetFlags constants for the various features' bit positions, but that the term 'suppress' is incorrect and may be confusing when used in conjunction with the mcFlagQTVRExplicitFlagSet flag.
As an example, this code forces the speaker button to be shown even when there is no sound track in a movie:
// This says: don't try and figure out whether to display the button, just take whatever
// we set before (not off, aka 'on') and make it so.
// That is, for myFlags, this IS an ExplicitFlagSet, and DO make the SpeakerButton flag explicit.
// Don't be confused by the word 'suppress'; we're just using this constant to specify a bit position.
Pages A-1 to A-2, A-15: Object nodes make use of the "panorama" hotspot cursors, resource IDs -19699 to -19685; the "object" hotspot cursors, resource IDs -19898 to -19895, are never used.
Addendum: Show Hotspots uses a MovieDrawingCompleteProc for object nodes, of which a movie can only have one; if you need to use a MovieDrawingCompleteProc for a movie in your application, you can either suppress the Show Hotspots button, or intercept the button's actions and implement your own Show Hotspots functionality. Panorama nodes do not use a MovieDrawingCompleteProc, and draw their hotspots prior to an application's PrescreenImagingCompleteProc being called if present.
Hints & Tips:
With a transition enabled (i.e., the swing transition), as without, it is important to set the target FOV before the tilt and pan angles, in order that the latter not be limited by the former.
General Usage and Technical Notes
The VR Programming with QTVR 2.0 book is included in Adobe Acrobat 3.0 PDF format. This file has links to QuickTime™ VR movies; for those movies to play, you must first have the QuickTime™ VR extension installed and have MoviePlayer present on your machine.
For futher information on the QuickTime™ VR 2.0 extension, please see About QuickTime™ VR 2.0.
Transition Issues: Using the QuickTime VR API to Program for Windows and the Web
The QuickTime VR API works on QuickTime VR 1.0 content as well as QuickTime VR 2.0 content. However, to run programs created using the QuickTime VR API, the user will need the QuickTime VR 2.0 system extension for the platform they are using: Macintosh, 32-bit Windows, or 16-bit Windows.
For Macintosh, the user will need the QuickTime VR 2.0 system extension included in this package. Distribute the extension with your application and include it in your program's installation procedure.
For 32-bit Windows, the user will need the upcoming QuickTime VR 2.0.1 extension for 32-bit Windows. This extension depends on an upcoming release of QuickTime that is expected to be available in the second quarter of 1997; the QuickTime VR 2.0.1 extension for 32-bit Windows will follow shortly after. Distribute the extension with your application and have the user install it. Also, check for the upcoming version of QuickTime; consider including it with your program so the user can install it as well.
For 16-bit Windows, new versions of QuickTime and QuickTime VR for 16-bit Windows are under consideration and may be released later in 1997.
For the Web, the QuickTime VR API does not work directly. Apple is investigating options such as Java, Macromedia's ShockWave, and other means to support the distribution of multimedia programs with QuickTime VR content over the Web.
For more information and an update on these issues, please see:
- The QuickTime Web site, http://quicktime.apple.com
- The QuickTime VR Web site, http://quicktimevr.apple.com
- The free QuickTime and QuickTime VR developer mailing lists; subscription instructions are available on the respective Web sites
- The Apple developer support program, http://devworld.apple.com/dev/dev.shtml.
"Acrobat(R) Reader copyright (C) 1987-1996 Adobe Systems Incorporated. All
rights reserved. Adobe and Acrobat are trademarks of Adobe Systems Incorporated."